package com.example.client;

import com.example.fallback.HiClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author wangyaohan
 * @Date 2021/9/9 11:00
 * @ClassName HiClient
 */
@Component
@FeignClient(name = "eureka-service",path = "user",fallback = HiClientFallBack.class)
public interface HiClient {

    @RequestMapping("{id}")
    String hi(@PathVariable("id") Long id);

    @RequestMapping("find")
    String find();
}
